doctype html
html.playbody
  head
    meta(charset="utf-8")
    meta(name="viewport",content="width=device-width, initial-scale=1, maximum-scale=1")
    title= title
    link(rel='stylesheet', href='/stylesheets/style.css')
  body.playbody
    .player
    script(src="/ckplayer/ckplayer.min.js")
    script.
      function getParentUrl() {   
         var url = null;  
         if (parent !== window) {   
             try {  
                url = parent.location.href;   
             }catch (e) {   
                url = document.referrer;   
             }   
          }  
          return url;  
      }
      var parenturl = getParentUrl();
      var antiurl = "#{antiurl}";
      if(antiurl != ""){
        if(parenturl != null && parenturl.indexOf("#{antiurl}")==0){
          var videoObject = {
            container: '.player',//“#”代表容器的ID，“.”或“”代表容器的class
            variable: 'player',//该属性必需设置，值等于下面的new chplayer()的对象
            autoplay:false,//自动播放
            video:'/videos/#{id}/index.m3u8?token=#{token}'//视频地址
          };
          var player=new ckplayer(videoObject);
        }
      } else {
        var videoObject = {
          container: '.player',//“#”代表容器的ID，“.”或“”代表容器的class
          variable: 'player',//该属性必需设置，值等于下面的new chplayer()的对象
          autoplay:false,//自动播放
          video:'/videos/#{id}/index.m3u8?token=#{token}'//视频地址
        };
        var player=new ckplayer(videoObject);
      }
      